import request from '@/utils/myrequest'
// （回车事件），带出灰色框的内容
export function getFormInfos(kvs) {
  return request({
    url: '/mtms/MaterialInfo/GetByCode',
    method: 'get',
    kvs
  })
}

// 确认新增
export function doAdd(kvs) {
  return request({
    url: '/mtms/MaterialOnMachine/Add',
    method: 'POST',
    kvs
  })
}

//
export function getInitList(kvs) {
  return request({
    url: '/mtms/MaterialUsedHistory/GetList',
    method: 'get',
    kvs
  })
}

export function getMaterialInfo(kvs) {
  return request({
    url: '/mtms/MaterialInfo/GetMaterialInfo',
    method: 'get',
    kvs
  })
}

// 材料上机
export function doMaterialLendOnEqp(kvs) {
  return request({
    url: '/mtms/MaterialInfo/MaterialLendOnEqp',
    method: 'POST',
    kvs
  })
}

// 材料下机
export function doMaterialGetOffEqp(kvs) {
  return request({
    url: '/mtms/MaterialInfo/MaterialGetOffEqp',
    method: 'POST',
    kvs
  })
}
